<script lang="ts" setup>
defineProps<{ customStyle?: any }>();
</script>

<template>
	<view class="um-card" :style="customStyle">
		<div class="content">
			<slot name="cover"></slot>
			<view class="body">
				<slot></slot>
			</view>
		</div>
		<um-divider v-if="$slots.footer" :height="4"></um-divider>
		<slot name="footer"></slot>
	</view>
</template>

<style lang="scss" scoped>
.um-card {
	background-color: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 10rpx;

	.content {
		display: flex;
		flex-direction: column;
		row-gap: 16rpx;
	}

	.body {
		flex: 1;
	}
}
</style>
